#{extends 'frame.html' /}

#{set title:'买手任务管理' /}



#{set 'moreStyles'}

<link rel="stylesheet" media="screen" href="@{'/public/stylesheets/admin/buyer-tasks.css'}" />

<link rel="stylesheet" media="screen" href="@{'/public/stylesheets/admin/user-manage.css'}" />

<link rel="stylesheet" media="screen" href="@{'/public/stylesheets/jquery.pagination.css'}" />

<link rel="stylesheet" media="screen" href="@{'/public/stylesheets/datePicker.css'}" />

#{/set}

<div class="contentCard">

	<div class="contentTitle">

		<span class="iconfont">&#xf00bf;</span>

		任务列表

	</div>

	<div id="taskFilterPanel">

		<div class="clearfix mb10">

			<span class="floatLeft mr10">平台</span>

			<select class="floatLeft mr10 lh" id="platform">

				<option value="">全部</option>

				#{list items:platforms, as:'p'}

				<option value="${p}">${p.title}</option>

				#{/list}

			</select>

			<span class="floatLeft mr10">终端</span>

			<select class="floatLeft mr10" id="device">

				<option value="">全部</option>

				#{list items:devices, as:'d'}

				<option value="${d}">${d.title}</option>

				#{/list}

			</select>

			<span class="floatLeft mr10">状态</span>

			<select class="floatLeft mr10" id="status">

				<option value="">全部</option>

				#{list items:taskStatus	, as:'s'}

				<option value="${s}">${s.title}</option>

				#{/list}

			</select>

			

			<!-- <span class="floatLeft mr10">买手昵称</span>

			<input type="text" id="buyerNick" class="floatLeft mr10 inputText" /> -->

			

		</div>

		<div class="clearfix mb10">

			<span class="floatLeft mr10">快递类型</span>

			<select class="floatLeft mr10 lh" id="expressType">

				<option value="">全部</option>

				#{list items:expressType, as:'e'}

				<option value="${e}">${e.title}</option>

				#{/list}

			</select>	

			<span class="floatLeft mr10">快递单号</span>

			<input type="text" id="expressNo" class="floatLeft mr10 inputText" />

			<span class="floatLeft mr10">订单编号</span>

			<input type="text" id="orderId" class="floatLeft mr10 inputText" />

		</div>

		<div class="clearfix mb10">

			<span class="floatLeft mr10">商家账号</span>

			<input type="text" id="sellerNick" class="floatLeft mr10 inputText" />

			<span class="floatLeft mr10">店铺名称</span>

			<input type="text" id="shopName" class="floatLeft mr10 inputText" />

			<span class="floatLeft mr10" title="比较长的任务编号">商家任务ID</span>

			<input type="text" id="taskId" class="floatLeft mr10 inputText" />

		</div>

		<div class="clearfix mb10">

			<span class="floatLeft mr10">买手账号</span>

			<input type="text" id="buyerNick" class="floatLeft mr10 inputText" />

			<span class="floatLeft mr10">买手旺旺</span>

			<input type="text" id="buyerAccount" class="floatLeft mr10 inputText" />

			<span class="floatLeft mr10" title="下面列表中的ID字段">买手任务ID</span>

			<input type="text" id="buyerTaskId" class="floatLeft mr10 inputText" />

		</div>

		<div class="clearfix">

			<div class="clearfix mb10">

				<div class="cal-content">

					<span class="floatLeft mr10">修改时间</span>

					<span class="floatLeft mr10 cal-date-input">

						<input class="inputDate start-date" id="modifyTimeStart" readonly="readonly" value=""  />

					</span>

					<span class="floatLeft mr10 med-cal-split">-</span>

					<span class="floatLeft mr10 cal-date-input">

						<input class="inputDate end-date" id="modifyTimeEnd" readonly="readonly" value="" />

					</span>

					<a class="stdColorButton floatLeft queryBtn lh mr20" href="javascript:;" id="queryBtn">查询</a>

					<a class="stdColorButton floatLeft queryBtn" href="/admin/buyerTask/refund/exportOverdue" target="_blank" id="exportOverdue">导出超过48小时未退款的任务</a>

				</div>					

			</div>

		</div>

	</div>

	<div class="mt10">

		<table class="normTable">

			<thead>

				<tr>

					<td style="width:10%">ID</td>

					<td style="width:30%">商品信息</td>

					<td style="width:20%">买手</td>

					<td style="width:30%">商家</td>

					<td style="width:30%">订单ID</td>

					<td style="width:15%">状态</td>

					<td style="width:9%">操作</td>

				</tr>

			</thead>

			<tbody id="taskContainer"></tbody>

		</table>

		<div id="noMsg">

			<div class="warnBox">

				<span class="iconfont">&#xf00b6;</span>

				没有任务!

			</div>

		</div>

		<div class="popWrapper" style="display: none;" id="tr_loading_mask">

			<div class="maskLayer"></div>

			<img class="tr_juhua" src="@{'/public/images/pre_loading.gif'}" />

		</div>

		<div class="pagin-btm clearFix"style="display: none;">

			<div class="pagination"></div>

		</div>

	</div>

</div>

<!-- 任务列表模板-->

<textarea id="taskTemp" class="muban">

	{{#results}}

	<tr>

		<td title="点击查看买手任务详情">	

			{{#isPC}}

			<i class="iconfont">&#xf0099;</i>

			{{/isPC}}

			{{^isPC}}

			<i class="iconfont">&#xf00a2;</i>

			{{/isPC}}

			</br>

			<a target="_blank" href="/admin/buyerTask/{{id}}" class="view-detail"><span class="task-id">{{id}}</span></a>

		</td>

		<td class="item-list">

			<div class="item-box">

				<div class="pic">

					<img src="{{itemPic}}" />

				</div>

				<p class="title">{{itemTitle}}</p>

			</div>

			任务ID:<a target="_blank" href="/admin/task/{{taskIdStr}}" class="view-detail">{{taskIdStr}}</a>

			

		</td>

		<td>

			<div class="tdLeft">账号：{{buyerNick}}</div></br>

			<div class="tdLeft">买号：{{buyerAccountNick}}</div></br>

			<div class="tdLeft">客服：{{buyerAdminNameStr}}</div></br>

			<div class="tdLeft">垫付：{{paidFeeStr}}</div>

		</td>

		<td>

			<div class="tdLeft">商家：{{sellerNick}}</div></br>

			<div class="tdLeft">店铺：<i class="plat_small {{platIcon}}"></i>{{shopName}}</div></br>

			<div class="tdLeft">客服：{{sellerAdminNameStr}}</div></br>

			<div class="tdLeft">佣金：{{rewardIngotStr}}</div>

		</td>

		<td>

			<div class="tdLeft">订单编号：{{orderId}}</div></br>

			<div class="tdLeft">快递类型：{{expressTypeStr}}</div></br>

			<div class="tdLeft">快递单号：{{expressNo}}</div></br>

			<div class="tdLeft">接手时间：{{takeTimeStr}}</div>

		</td>

		

		<td>

			{{statusTitle}}

		</td>

		<td>

			<a href="javascript:;" class="view-detail tdLeft cancel" bid="{{taskIdStr}}" data-id="{{id}}">取消任务</a>

			

			<a href="javascript:;" class="view-detail tdLeft updateExpress" id="updateExpress" data-expressNo="{{expressNo}}" bid="{{taskIdStr}}" data-id="{{id}}">修改运单号</a>

		</td>

	</tr>

	{{/results}}

</textarea>

<div class="popWrapper addAdminWnd" id="addAdminWnd">

	<div class="maskLayer"></div>

	<div class="modalWnd">

		<a href="javascript:void(0);" class="wnd_Close_Icon close" title="关闭窗口"></a>

		<h3 class="topTile">修改运单号</h3>

		<div class="modalWndInner" style="width:500px">

			<form id="addAdminForm">

			<input type="hidden" class="bold required inputText" style="width:260px;"  name="id" id="updateBuyerTaskId"/>

			 	<div class="panelLine">

			    	<span class="floatLeft mr10">原运单号：</span>

			    	<input type="text" class="bold required inputText" style="width:260px;" readonly="readonly" name="oldExpressNo" id="oldExpressNo"/>

			    </div>	

			    <div class="panelLine">

			    	<span class="floatLeft mr10">新运单号：</span>

			    	<input type="text" class="bold required inputText" style="width:260px;" name="expressNo" id="newExpressNo"/>

			    </div>			    				    		    

			</form>

		</div>

		<div class="wndBotButtonSection">

			<a id="btnAddAccount" href="javascript:;" class="botButton stdColorButton">增加</a>

		</div>

	</div>

</div>

<!-- templates -->

#{set 'moreScripts'}

<script src="@{'/public/javascripts/date.js'}" type="text/javascript"></script>

<script src="@{'/public/javascripts/jquery.datePicker.js'}" type="text/javascript"></script>

<script src="@{'/public/javascripts/mustache.min.js'}" type="text/javascript"></script>

<script src="@{'/public/javascripts/jquery.pagination.js'}" type="text/javascript"></script>

<script src="@{'/public/javascripts/jquery.number.min.js'}" type="text/javascript"></script>

<script src="@{'/public/javascripts/admin/buyerTasks.js'}" type="text/javascript"></script>

<script type="text/javascript">App.module = 'buyerTask';</script>

#{/set}